
import dialogForm from './edit'
import pagination from '@/views/pagination'  //分页组件
import {debounce,setEndDateTime} from '@/utils/index.js'
export default {
  name: 'confirmedBond',
  components: {
    dialogForm,pagination
  },
  created() {

  },
  data() {
    return {
      //搜索字段
      searchForm: {
        /*name1: "",
        name2: "",
        name3: "",
        region: "",
        start: "",
        end: ""*/
      },
      //表格字段
      tableData: {data:[{
        qcpp: "汽车品牌",
        qczpp: '子品牌',
        qccxx: '汽车车型',
        qccx: '汽车车系',
        dcsl: '12',
        clzjg: "222000",
        shzt: "未通过",
        ys: "红色"
      }]},
      //弹窗状态数据
      dialogSendData:{
        isAdd:"",
        dialogFormVisible:"",
        id:""
      },
      resetFormStatus:false

    }
  },

  methods: {
    /*搜索按钮方法*/
    //搜索
    seachData(){
      if(!this.resetFormStatus){
        var params=this.searchForm||{};
        params.page=this.tableData.page||1;
        params.rows=this.tableData.rows||10;
        agentHttp.post('adminApi/admin/carousel/queryAllByEntity',params ).then((data)=>{
              //this.tableData = data
        })
      }
    },
    //重置
    resetSearchForm(formName) {
      this.resetFormStatus=true;
      this.tableData.page=1;
      this.tableData.rows=10;
      this.$refs[formName].resetFields();
      this.$nextTick(_ =>{
        this.resetFormStatus=false;
        this.seachData();
      })
    },
    /*表格操作按钮*/
    //查看
    handleSee(index, row) {
      row?this.dialogSendData.id=row.id:this.dialogSendData.id="";
      this.dialogSendData.isAdd=false;
      this.dialogSendData.dialogFormVisible=true;

    },
    //新增、编辑
    handleEdit(index, row){
      row?this.dialogSendData.id=row.id:this.dialogSendData.id="";
      this.dialogSendData.isAdd=true;
      this.dialogSendData.dialogFormVisible=true;
    }
   
  }
}